package com.zhiyou100.entity;

import lombok.*;

import java.io.Serializable;
import java.util.Objects;
import java.util.Set;

/**
 * 学校实现类
 *
 * @author yang
 * @version 1.0.0
 * @date 2020-09-17 20:08
 */
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class School implements Serializable {
    private Integer scid;
    private String scname;
    private String scaddress;
    /**
     * 一个学校有多个老师  定义集合记录其拥有的所有老师
     */
    private Set<Teacher> teachers;

    @Override
    public String toString() {
        return "School{" +
                "scid=" + scid +
                ", scname='" + scname + '\'' +
                ", scaddress='" + scaddress + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        return super.equals(o);
    }

    @Override
    public int hashCode() {
        return super.hashCode();
    }
}
